<template>
  <div class="error-page">
    <div class="content-con">
      <img :src="src" alt="404" />
      <div class="text-con">
        <h4>{{ code }}</h4>
        <h5>{{ desc }}</h5>
        <el-button
          style="position: relative; z-index: 10; top: -10px"
          type="info"
          size="medium"
          @click="jumpToUpm"
          icon="el-icon-s-promotion"
          v-if="code == 401"
          round
          >{{ $t('index.PermissionsApplication') }}</el-button
        >
      </div>
      <!--<back-btn-group class="back-btn-group"></back-btn-group>-->
    </div>
  </div>
</template>

<script>
import './error.less'
import { openNewTag } from '@/utils/tools'
// import backBtnGroup from './back-btn-group.vue'
export default {
  name: 'error_content',
  components: {
    //    backBtnGroup
  },
  props: {
    code: String,
    desc: String,
    src: String,
  },
  methods: {
    jumpToUpm() {
      let url = ''
      switch (this.$store.state.app.environment) {
        case 'us':
          url = 'https://upm.prox.com/upm2-static/main/newapply/2560'
          break
        case 'de':
          url = 'https://upm.prox.com/upm2-static/main/newapply/2768'
          break
        case 'sim':
          url = 'https://upm.xiaojukeji.com/upm2-static/main/newapply/2100844'
      }
      this.$T.openNewTag(url)
      console.log('jump')
    },
  },
}
</script>
